﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Addnewstock.aspx.cs" Inherits="Store_Keeper_Addnewstock" %>

<%@ Register Assembly="DevExpress.Web.ASPxEditors.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        .style1
        {
            width: 209px;
        }
        .style2
        {
            margin-left: 280px;
        }
        .style3
        {
            margin-left: 40px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
      <table  width="100%">
                <tr>
                <td class="style4" >
                    &nbsp;</td>
                    <td class="style1" >
                        &nbsp;</td>
                    <td class="style14">
                    <strong>Select Item&nbsp; Name</strong></td>
                    <td class="style25" width="150" >
                         <dx:ASPxComboBox ID="DropDownList4" runat="server" DropDownStyle="DropDown" IncrementalFilteringMode="StartsWith"
                DataSourceID="SqlDataSource1"  TextField="Pro_Name" TextFormatString="{0}"
                            ValueField="Pro_Name"
                Width="200px" ClientIDMode="AutoID" CssFilePath="~/App_Themes/BlackGlass/{0}/styles.css" 
                             CssPostfix="BlackGlass" EnableIncrementalFiltering="True" 
                             SpriteCssFilePath="~/App_Themes/BlackGlass/{0}/sprite.css" 
                             AutoPostBack="True" 
                             onselectedindexchanged="DropDownList4_SelectedIndexChanged1" >
                             <LoadingPanelImage Url="~/App_Themes/BlackGlass/Editors/Loading.gif">
                             </LoadingPanelImage>
                             <ButtonStyle Width="11px">
                             </ButtonStyle>
                             <ValidationSettings ErrorText="Error has occurred">
                                 <ErrorFrameStyle ImageSpacing="4px">
                                     <ErrorTextPaddings PaddingLeft="4px" />
                                 </ErrorFrameStyle>
                             </ValidationSettings>
                             <Columns>
                    <dx:ListBoxColumn FieldName="Pro_Name" Caption="Item" Width="100px" />
                    <dx:ListBoxColumn FieldName="Pro_ID" Width="300px" Visible="false" />
                </Columns>
                         </dx:ASPxComboBox>
                          
                     
                    </td>
                <td >
                    
                    </td>
                    <td>
                        &nbsp;</td>
            </tr>
                <tr>
                <td class="style4" >
                    &nbsp;</td>
                    <td class="style1" >
                        &nbsp;</td>
                    <td class="style14">
                        &nbsp;</td>
                    <td class="style25" >
                        &nbsp;</td>
                <td >
                    &nbsp;</td>
                    <td>
                        &nbsp;</td>
            </tr>
                <tr>
                <td class="style4" >
                    &nbsp;</td>
                    <td class="style1" >
                        <strong>Item Code</strong></td>
                    <td class="style14">
                       
                        <dx:ASPxTextBox  ID="Productid" runat="server" ClientIDMode="AutoID" 
                            CssFilePath="~/App_Themes/BlackGlass/{0}/styles.css" CssPostfix="BlackGlass" 
                            SpriteCssFilePath="~/App_Themes/BlackGlass/{0}/sprite.css" Width="150px" 
                            BackColor="#D8E3B6" ReadOnly="True">
                            <ValidationSettings>
                                <ErrorFrameStyle ImageSpacing="4px">
                                    <ErrorTextPaddings PaddingLeft="4px" />
                                </ErrorFrameStyle>
                                <RequiredField ErrorText="Please fill this feild" IsRequired="True" />
                            </ValidationSettings>
                        </dx:ASPxTextBox>
                    </td>
                    <td class="style25" >
                        <strong>Product Code</strong></td>
                <td >
                    <dx:ASPxTextBox ID="ASPxTextBox5" runat="server" Width="150px" 
                        BackColor="#D8E3B6" ReadOnly="True">
                        <ValidationSettings>
                            <RequiredField ErrorText="Please Fill this Field" IsRequired="True" />
                        </ValidationSettings>
                    </dx:ASPxTextBox>
                </td>
                    <td>
                        &nbsp;</td>
            </tr>
            <tr>
                <td class="style4"  >
                    &nbsp;</td>
                <td class="style1" >
                        <strong>
                        <asp:Label ID="Label4" runat="server" Text="Category " Width="100px" 
                            CssClass="style24"></asp:Label>
                        </strong></td>
                <td class="style14">
                    <dx:ASPxTextBox ID="catname" runat="server" Width="150px" BackColor="#D8E3B6" 
                        ReadOnly="True">
                        <ValidationSettings>
                            <RequiredField ErrorText="Please Fill this Field" IsRequired="True" />
                        </ValidationSettings>
                    </dx:ASPxTextBox>
                </td>
                <td class="style25" >
                        <strong>Subcategory </strong></td>
                <td >
                    <dx:ASPxTextBox ID="subcatname" runat="server" Width="150px" 
                        BackColor="#D8E3B6" ReadOnly="True">
                       
                    </dx:ASPxTextBox>
                </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style4" >
                    &nbsp;</td>
                <td class="style1" >
                    <strong>Item Brand</strong></td>
                <td class="style14">
                    <dx:ASPxTextBox ID="brand" runat="server" ClientIDMode="AutoID" Width="150px" 
                        BackColor="#D8E3B6" ReadOnly="True">
                        <ValidationSettings>
                            <RequiredField ErrorText="Please Fill this Field" IsRequired="True" />
                        </ValidationSettings>
                    </dx:ASPxTextBox>
                </td>
                <td class="style25">
                    <strong>Stock Code</strong></td>
                <td>
                    <dx:ASPxTextBox ID="ASPxTextBox3" runat="server" Width="150px" 
                        BackColor="#D8E3B6" ReadOnly="True">
                    </dx:ASPxTextBox>
                </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style4" >
                    &nbsp;</td>
                <td class="style1">
                    <strong><span class="style24">Purchase</span>&nbsp;<span class="style24">Price</span></strong></td>
                <td class="style2">
                    <dx:ASPxTextBox ID="purchaseprice" runat="server" ClientIDMode="AutoID" 
                        DisplayFormatString="Rs.{0}" Width="150px">
                        <MaskSettings Mask="&lt;0..9999999g&gt;.&lt;00..99&gt;" />
                        
                    </dx:ASPxTextBox>
                </td>
                <td class="style25">
                    <strong>Retail Price </strong></td>
                <td class="style3">
                    <dx:ASPxTextBox ID="retailprice" runat="server" AutoPostBack="True" 
                        DisplayFormatString="Rs.{0}" 
                       Width="150px" ontextchanged="retailprice_TextChanged">
                        <MaskSettings Mask="&lt;0..9999999g&gt;.&lt;00..99&gt;" />
                        
                    </dx:ASPxTextBox>
                </td>
                <td>
                    &nbsp;</td>
            </tr>
                            
            <tr>
                <td class="style4" >
                    &nbsp;</td>
                <td class="style1">
                        <span class="style24"><strong>Distributor Price</strong></span></td>
                <td class="style14">
                        <dx:ASPxTextBox ID="productprice" runat="server" ClientIDMode="AutoID" 
                            DisplayFormatString="Rs.{0}" Width="150px" BackColor="#D8E3B6" 
                            Height="19px" ReadOnly="True">
                            <MaskSettings IncludeLiterals="DecimalSymbol" 
                                Mask="&lt;0..99999g&gt;.&lt;00..99&gt;" />
                            <ValidationSettings>
                                <RequiredField ErrorText="Please Fill this field" IsRequired="True" />
                            </ValidationSettings>
                        </dx:ASPxTextBox>
                </td>
                <td class="style25">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
                            
            <tr>
                <td class="style4" >
                    &nbsp;</td>
                <td class="style1">
                        <strong>Point Value</strong></td>
                <td class="style14">
                        <dx:ASPxTextBox ID="pointvalue" runat="server" AutoPostBack="True" 
                            ClientIDMode="AutoID" CssFilePath="~/App_Themes/BlackGlass/{0}/styles.css" 
                            CssPostfix="BlackGlass" 
                            SpriteCssFilePath="~/App_Themes/BlackGlass/{0}/sprite.css" Width="100px" 
                            BackColor="#D8E3B6" ReadOnly="True">
                            <MaskSettings Mask="&lt;0..99999g&gt;.&lt;000..999&gt;" />
                            <ValidationSettings>
                                <ErrorFrameStyle ImageSpacing="4px">
                                    <ErrorTextPaddings PaddingLeft="4px" />
                                </ErrorFrameStyle>
                                <RequiredField ErrorText="Please Enter Point Value to this Product" 
                                    IsRequired="True" />
                            </ValidationSettings>
                        </dx:ASPxTextBox>
                </td>
                <td class="style25">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
                            
            <tr>
                <td class="style4" >
                    &nbsp;</td>
                <td class="style1">
                    <strong>Bussiness Value</strong></td>
                <td class="style14">
                      <dx:ASPxTextBox ID="businesspoint" runat="server" BackColor="#D8E3B6" 
                    ClientIDMode="AutoID" CssFilePath="~/App_Themes/Aqua/{0}/styles.css" 
                    CssPostfix="Aqua" SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css" 
                    Width="75px" ReadOnly="True">
                    <MaskSettings Mask="&lt;0..99999g&gt;.&lt;000..999&gt;" />
                    <ValidationSettings>
                        <ErrorFrameStyle ImageSpacing="4px">
                            <ErrorTextPaddings PaddingLeft="4px" />
                        </ErrorFrameStyle>
                        <RequiredField ErrorText="Please Fill this Field" IsRequired="True" />
                    </ValidationSettings>
                </dx:ASPxTextBox>
                </td>
                <td class="style25">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
                            
            <tr>
                <td class="style4" >
                    &nbsp;</td>
                    <td class="style1">
                        <strong>Item image</strong></td>
                <td class="style14">
                        <strong>
                        <asp:FileUpload ID="FileUpload1" runat="server" class="multi" Width="200px" />
                        </strong>
                </td>
                <td class="style25">
                    <dx:ASPxLabel ID="ASPxLabel2" runat="server" Text="ASPxLabel" Visible="False" 
                        Font-Bold="True" Font-Size="Medium" ForeColor="Red">
                    </dx:ASPxLabel>
                </td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
                            
            <tr>
                <td class="style4" >
                    &nbsp;</td>
                    <td class="style1">
                        &nbsp;</td>
                <td class="style14">
                        &nbsp;</td>
                <td class="style25">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
                            
            <tr>
                <td class="style4" >
                    &nbsp;</td>
                <td class="style1">
                        &nbsp;</td>
                <td class="style14">
                        &nbsp;</td>
                <td class="style25">
                    <dx:ASPxButton ID="ASPxButton2" runat="server" 
                        CssFilePath="~/App_Themes/BlackGlass/{0}/styles.css" CssPostfix="BlackGlass" 
                        
                        SpriteCssFilePath="~/App_Themes/BlackGlass/{0}/sprite.css" 
                        Text="Add New Stock" onclick="ASPxButton2_Click" >
                    </dx:ASPxButton>
                </td>
                <td>
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:BestlifeDBConnectionString %>" 
                        SelectCommand="SELECT DISTINCT [Pro_Name], [Pro_ID] FROM [Tbl_Product]">
                    </asp:SqlDataSource>
                </td>
                <td>
                    &nbsp;</td>
            </tr>
                            
    </table>
    </div>
    </form>
</body>
</html>
